/*
    Code : Dzlua
    Email: 505544956@qq.com
    Time : 2017/05/28
*/
#ifndef _DZLUA_FILE_H_
#define _DZLUA_FILE_H_
#pragma once

#include "../export.h"

#include <string>

namespace dzlua {

class DZLUA_EXPORT File {
public:
    /*
        read the file to string.
        std::string file = "testfile.txt";
        std::string con = File::ReadFile(file);
    */
    static std::string ReadFile(const std::string& input);
    static std::wstring ReadFile(const std::wstring& input);
    /*
        write the string to file.
        std::string file = "testfile.txt";
        std::string con = "this is the text content, used for test dzlua::File.";
        bool bok = File::WriteFile(file, con);
    */
    static bool WriteFile(const std::string& input, const std::string& con);
    static bool WriteFile(const std::wstring& input, const std::wstring& con);
};

} // end namespace dzlua

#endif //_DZLUA_FILE_H_